<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Demonstration of ROC curve</title>
        <style type="text/css">
            body{
                font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
            }
            .layout-wrapper{
                max-width: 850px;
                margin: auto;

            }

            input{
                width: 60px;
                margin-right: 20px;
            }
			
			.axis path,
			.axis line {
				fill: none;
				stroke: black;
				shape-rendering: crispEdges;
			}
			
			.axis text {
				font-family: sans-serif;
				font-size: 11px;
			}
			
			svg path {
    			fill: none;
    			stroke-width: 2;
			}
			
			.block1 {
			    background: none;
                padding: 5px;
                display: inline-block;
            }
			
			.block2 {
				background: none;
                padding: 5px;
                display: inline-block;
			}

			.controls{
				padding: 10px;
                background-color: #cdf;
			}

            .thresholdLine{
                cursor: ew-resize;
            }

            .pdf_area1{
                fill: rgba(250, 100, 100, 0.2);

            }

            .pdf_area2{
                fill: rgba(100, 100, 250, 0.2);

            }
		</style>
    </head>
    <body>
        <div class="layout-wrapper">
            <h2 style="padding-left: 20px;">
                ROC curve demo
            </h2>
            <div class="controls">
                <label for="mean1">mean #1:</label><input id="mean1" type = "number" size = "5" value = "0" onchange="draw()">
                <label for="mean2">mean #2:</label><input id="mean2" type = "number" size = "5" value = "2" onchange="draw()">
                <label for="var1">variance #1:</label><input id="var1" type = "number" size = "5" value = "4" onchange="draw()">
                <label for="var2">variance #2:</label><input id="var2" type = "number" size = "5" value = "4" onchange="draw()">
            </div>
            <div id="renderer">
                <!-- here all the plots will be rendered -->
            </div>
            <div style="padding: 20px;">
                <h3>Instructions</h3>
                <p>
                    On the right plot: two compared distributions (for demonstration normal distributions were taken).
                </p>
                <p>
                    On the left plot: corresponding
                    <a href="https://en.wikipedia.org/wiki/Receiver_operating_characteristic">ROC curve.</a>
                </p>
                <p>
                    Controls:
                </p>
                <ul>
                    <li>4 inputs with means and variances of distributions</li>
                    <li>Also vertical line corresponding to threshold can be moved</li>
                </ul>
                <p>
                    For detailed explanation see <a href="http://arogozhnikov.github.io/2015/10/05/roc-curve.html">this post</a>. <br />
                    Presentation was prepared by Oleg Alenkin and Alex Rogozhnikov.
                </p>
            </div>
        </div>
        <script src="/scripts/d3.min.js" charset="utf-8"></script>
		<script src="/scripts/jquery-2.1.4.js" charset="utf-8"></script>
		<script src="/scripts/roc_curve.js" charset="utf-8"></script>
    </body>
</html>